int maxOperations(int* nums, int numsSize)
{
    if (numsSize <= 1)return 0;
    int temp = 0;
    int ret = 0;
    for (int i = 1; i < numsSize; i += 2)
    {
        if (0 == temp)
        {
            temp = nums[i] + nums[i - 1];
            ++ret;
        }
        else
        {
            if (nums[i] + nums[i - 1] == temp)
            {
                ++ret;
            }
            else
                break;
        }
    }
    return ret;
}